<!DOCTYPE html>
<html>
<head>
    <title>用户中心</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta charset="utf-8" />
    <meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href="Css/style.css" rel="stylesheet" type="text/css">
    <link href="Css/usercenter.css" rel="stylesheet" type="text/css">
    <script src="Scripts/http.js"></script>
    <script type="text/javascript" src="Scripts/jquery-1.8.3.min.js"></script>
    <link rel="stylesheet" href="Css/common.css">

     <script>
         /* 用途: 接收地直栏参数 取id=1 根据ID的值 */
         var newsid = geturlcanshu();

         $(function() {
         var allphone = '';
         var openid = '';
         var orders = '';
         getorderinfo();
         function getorderinfo() {
             $.ajax({
                 url: url + 'getOrders',
                 dataType: 'json',
                 type: 'post',
                 async: false,
                 data: {'status':newsid},
                 success: function (result) {
                     // console.log(result);
                     var status = result.status;
                     var code = result.code;
                     if (status == 1 && code == '1001') {
                         orders = result.data;
                         var html = '';
                         if(orders.length>0){
                             for (var i = 0; i < orders.length; i++) {
                                 html += '<div class="user-helpcenter user-common">'
                                         +'<a class="hc-helpCenter" href="ordertails.html?id='+orders[i]['id']+'" style="width: 97%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">'+
                                         orders[i]['content']+'<em></em></a></div>';
                             }
                         }else{
                             html +='<div class="user-helpcenter user-common">'
                                     +'<a class="hc-helpCenter" href="#" style="width: 97%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">'+
                                     '没有相应订单'+'<em></em></a></div>';
                         }

                         $('.viewport').html(html);
                     }
                 },
                 error: function (result) {
                     console.log("error")
                 }
             });
         }
     });


     </script>
</head>
<body>

<div class="yintai-header">
    <p href="javascript:void(0);" class="back-button" ></p>
    <div class="hear-name"><div>用户订单中心</div></div>
</div>

<div class="viewport">


    <div class="user-helpcenter user-common">
        <a class="hc-helpCenter" href="javascript:void(0);">没有订单<em></em></a>
    </div>

</div>




</body>
</html>
